import { useState } from 'react'
import { getClassIfy,getRightIfy,getClassxqList,getgoodxqList,getinpList } from '@/api/classify';
interface URa{
  id:string
}

export default function classIfyModel(){
  async function getlassify():Promise<any>{
    let result = await getClassIfy();
    console.log(result.data.categoryList,'11-11-1');
    return result
   
  }
  async function getRightify(data:URa):Promise<any>{
    // console.log(data,'3-123123');
    let result = await getRightIfy(data)
    return result
    
  }
  async function getClassxqList1(id:string):Promise<any>{
    // console.log(id,'3-123123');
    let result = await getClassxqList(id)
    // console.log(result);
    return result
    
  }
  async function getgoodxqList1(categoryId:string):Promise<any>{
    let result = await getgoodxqList(categoryId)
    console.log(result,'1111111111111111111111111-----------');
    return result
  }
  const getinpLists = async (keyword:string)=>{
    let res = await getinpList(keyword)
    return res
  }
  return {
    getinpLists,
    getgoodxqList1,
    getClassxqList1,
    getRightify,
    getlassify
  }
}
